<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/CampHouseType.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/CampHouseType.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '营位房型',
                    name: 'CampHouseType',
                    url: "/CampHouseType/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"name":"",parentId:"",supplierCode:"",unitId:""},
                editFormOptions: [
                //     [{ "dataKey": "mall_supplier", "data": [], "title": "供应商", "field": "supplierCode", "type": "select","required":true }],
                [{"title":"单位列表","required":true,"field":"unitId","type":"select",dataKey:'',data: []},],    
                [{"title":"营房类型","required":true,"field":"parentId","type":"select",dataKey:'CampsiteHouseType',data: []}],    
                [{"title":"房型名称","field":"name","type":"text","required":true,}]],
                searchFormFields: {"name":"",'parentId':""},
                searchFormOptions: [[{"title":"房型名称","field":"name",type:"like"},{"title":"营房类型","field":"parentId","dataKey":"CampsiteHouseType","data":[],"type":"select",}]],
                columns: [
                        {field:'name',title:'房型名称',type:'string',width:220,align:'left'},
                       {field:'parentId',title:'营房类型',type:'int',width:90,align:'left',bind: { key: 'CampsiteHouseType', data: [] }},
                    //    {field:'supplierCode',title:'供应商名称',type:'string',width:120,align:'left'},
                        {field:'unitId',title:'单位列表',type:'string',bind:{ key:'unitIdList',data:[]},width:120,align:'left'},
                        {field:'creator',title:'创建人',type:'string',width:100,align:'left'},
                        {field:'createDate',title:'创建时间',type:'datetime',width:190,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:190,align:'left',sortable:true},
                    ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
